package com.ruyiadmin.springboot.entity_data_model.entity_model.system_model;

import com.baomidou.mybatisplus.annotation.*;
import com.ruyiadmin.springboot.common_infrastructure.models.base_entity_model.RuYiAdminBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 用户实体模型
 *
 * @author RuYiAdmin
 * @since 2022-06-21
 */
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "用户表")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysUser extends RuYiAdminBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField("LOGON_NAME")
    @ApiModelProperty("登录账号")
    @NotNull
    @Length(max = 128)
    private String logonName;

    @TableField("DISPLAY_NAME")
    @ApiModelProperty("用户名")
    @NotNull
    @Length(max = 128)
    private String displayName;

    @TableField("PASSWORD")
    @ApiModelProperty("用户密码")
    @NotNull
    @Length(max = 512)
    private String password;

    @TableField("TELEPHONE")
    @ApiModelProperty("座机号")
    @Length(max = 45)
    private String telephone;

    @TableField("MOBILEPHONE")
    @ApiModelProperty("手机号")
    @Length(max = 45)
    private String mobilephone;

    @TableField("EMAIL")
    @ApiModelProperty("电子邮件")
    @Length(max = 45)
    private String email;

    @TableField("IS_SUPPER_ADMIN")
    @ApiModelProperty("是否超级用户")
    private int isSupperAdmin;

    @TableField("SERIAL_NUMBER")
    @ApiModelProperty("序号")
    private int serialNumber;

    @TableField("IS_ENABLED")
    @ApiModelProperty("是否启用，0：禁用，1：启用")
    private int isEnabled;

    @ApiModelProperty("性别，男：0，女：1，第三性别：2")
    @TableField("SEX")
    @NotNull
    private Integer sex;

    @ApiModelProperty("盐")
    @TableField("SALT")
    @NotNull
    private String salt;

    @ApiModelProperty("预留字段1")
    @TableField("EXTEND1")
    @Length(max = 36)
    private String extend1;

    @ApiModelProperty("预留字段2")
    @TableField("EXTEND2")
    @Length(max = 64)
    private String extend2;

    @ApiModelProperty("预留字段3")
    @TableField("EXTEND3")
    @Length(max = 128)
    private String extend3;

    @ApiModelProperty("预留字段4")
    @TableField("EXTEND4")
    @Length(max = 256)
    private String extend4;

    @ApiModelProperty("预留字段5")
    @TableField("EXTEND5")
    @Length(max = 512)
    private String extend5;

}

